<%@page import="java.io.PrintWriter"%>
<%@page import="dbc.DBOperator" import = "vo.Student"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String sid = request.getParameter("sid");
Student stu = new Student();
stu.setSid(sid);
stu.setSname(request.getParameter("sname"));
stu.setSex(request.getParameter("sex"));
stu.setAge(Integer.parseInt(request.getParameter("age")));
stu.setSclass(request.getParameter("sclass"));
DBOperator db = new DBOperator();
if (db.doInsert(stu)) {
    response.getWriter().println("学生添加成功！！！");
} else {
    response.getWriter().println("学生添加不成功！！！");
}
%>
</body>
</html>